package com.kedacom.demo.xmemcached;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

@Service
public class MemcacheClientConfig {

	@Value("${memcache.servers}")
	private String servers;
	@Value("${memcache.connection.poolsize}")
	private int connectionPoolSize;

	@Value("${memcache.item.expiretime}")
	private int expireTime = 0; // 永远存储，默认是1个月，单位秒
	@Value("${memcache.operation.timeout}")
	private int timeout = 3000; // 操作超时时间，默认是1000

	public String getServers() {
		return servers;
	}

	public void setServers(String servers) {
		this.servers = servers;
	}

	public int getConnectionPoolSize() {
		return connectionPoolSize;
	}

	public void setConnectionPoolSize(int connectionPoolSize) {
		this.connectionPoolSize = connectionPoolSize;
	}

	public int getExpireTime() {
		return expireTime;
	}

	public void setExpireTime(int expireTime) {
		this.expireTime = expireTime;
	}

	public int getTimeout() {
		return timeout;
	}

	public void setTimeout(int timeout) {
		this.timeout = timeout;
	}

}
